﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using Entities;
using BLL;

namespace Stationery.UC
{
    public partial class UC_CookOnScreen : System.Web.UI.UserControl
    {
        BLL_Cook bll_Cook = new BLL_Cook();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.Params["viewtype"] == null)
            {
                ControlBody.Controls.Add(LoadControl("~/UC/UC_TotalCook.ascx"));
            }
            else if (Request.Params["viewtype"] == "detail")
            {
                int cookid = 0;
                cookid = Convert.ToInt32(Request.Params["cookid"]);
                if (cookid == -1)
                    return; //or Invalid Page

                ControlBody.Controls.Add(LoadControl("~/UC/UC_CookDetail.ascx"));
            }
            else
            {
                return; //or Invalid Page
            }     
        }
    }
}